package com.ruoyi.web.controller.service.impl;

import com.ruoyi.web.controller.entity.Curd;
import com.ruoyi.web.controller.mapper.curdMapper;
import com.ruoyi.web.controller.service.curdService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class curdServiceImpl implements curdService {
    @Autowired
    private curdMapper mapper;
    @Override
    public List< Curd > getAll() {
        return mapper.getAll();
    }

    @Override
    public void addCurd(Curd curd) {
        mapper.addCurd(curd);
    }

    @Override
    public void delCurd(int id) {
        mapper.delCurd(id);
    }

    @Override
    public void updateCurd(Curd curd) {
        mapper.updateCurd(curd);
    }

    @Override
    public Curd getById(int id) {
        Curd curd = mapper.getById(id);
        return curd;
    }

}
